﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;
using System.Text;

namespace ChequePrinter.WCF
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class SilverChequeService
    {
        DAL Dal = new DAL();

        [OperationContract]
        public DateTime GetTime()
        {
            // Add your operation implementation here
            return DateTime.Now;
        }

        [OperationContract]
        public List<Cheque> GetCheques()
        {
            return Dal.GetCheques();
            
        }

        [OperationContract]
        public int  InsertCheque(Cheque cheque )
        {
            return Dal.InsertCheque(cheque);

        }

        [OperationContract]
        public void UpdateCheque(Cheque cheque)
        {
            Dal.UpdateCheque(cheque);

        }


        [OperationContract]
        public void DeleteCheque(int id)
        {
            Dal.DeleteCheque(id);

        }




        // Add more operations here and mark them with [OperationContract]
    }
}
